package com.jvxb.demo.entity;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

import java.io.Serializable;
import java.util.Date;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;

/**
 * <p>
 * 系统用户表
 * </p>
 *
 * @author jvxb
 * @since 2022-12-11
 */
@Getter
@Setter
@TableName("sys_user")
@ApiModel(value = "SysUser对象", description = "系统用户表")
public class SysUser implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty("主键")
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @ApiModelProperty("所属角色id")
    private Integer roleId;

    @ApiModelProperty("所属角色 (冗余设计)")
    private String roleName;

    @ApiModelProperty("用户名")
    private String userName;

    @ApiModelProperty("用户code")
    private String userCode;

    @ApiModelProperty("登录名")
    private String loginName;

    @ApiModelProperty("登录密码")
    private String password;

    @ApiModelProperty("手机号码")
    private String phone;

    @ApiModelProperty("帐号是否有效 0 无效 1有效")
    private Integer valid;

    @ApiModelProperty("创建时间")
    @TableField(fill = FieldFill.INSERT)
    private Date createTime;

    @ApiModelProperty("更新时间")
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private Date updateTime;


    public static final String ID = "id";

    public static final String ROLE_ID = "role_id";

    public static final String ROLE_NAME = "role_name";

    public static final String USER_NAME = "user_name";

    public static final String USER_CODE = "user_code";

    public static final String LOGIN_NAME = "login_name";

    public static final String PASSWORD = "password";

    public static final String PHONE = "phone";

    public static final String VALID = "valid";

    public static final String CREATE_TIME = "create_time";

    public static final String UPDATE_TIME = "update_time";

}
